<!--%import("filter/update_category.xml")-->

<!--#include("./header.html")-->
{@
	$validator_ids = array(
		'modules/module/tpl/category_list/1' => 1,
		'modules/module/tpl/category_list/2' => 1,
		'modules/module/tpl/category_update_form/1' => 1
	);
}
<div cond="$XE_VALIDATOR_MESSAGE && isset($validator_ids[$XE_VALIDATOR_ID])" class="message {$XE_VALIDATOR_MESSAGE_TYPE}">
	<p>{$XE_VALIDATOR_MESSAGE}</p>
</div>
<!-- 카테고리의 위/아래, 삭제와 관련된 form -->
<form id="fo_category_info" action="./" method="post">
	<input type="hidden" name="module" value="module" />
	<input type="hidden" name="act" value="procModuleAdminDeleteCategory" />
    <input type="hidden" name="module_category_srl" value="" />
	<input type="hidden" name="xe_validator_id" value="modules/module/tpl/category_list/1" />
</form>
<table class="x_table x_table-striped x_table-hover">
	<thead>
		<tr>
			<th>{$lang->category_title}</th>
			<th>{$lang->regdate}</th>
			<th>&nbsp;</th>
		</tr>
	</thead>
	<tbody>
		<!--@if(!count($category_list))-->
		<tr>
			<td colspan="3">{$lang->msg_category_is_null}</td>
		</tr>
		<!--@end-->
		<!--@foreach($category_list as $key => $val)-->
		<tr>
			<td>{$val->title}</td>
			<td>{zdate($val->regdate,"Y-m-d")}</td>
			<td>
				<a class="x_btn x_btn-link" href="{getUrl('module_category_srl',$val->module_category_srl)}">{$lang->cmd_modify}</a> 
				<i>|</i> 
				<button type="button" class="x_btn x_btn-link" onclick="doUpdateCategory('{$val->module_category_srl}','{$lang->confirm_delete}');return false;">{$lang->cmd_delete}</button>
			</td>
		</tr>
		<!--@end-->
	</tbody>
</table>
<!-- 카테고리 추가 -->
<form ruleset="insertCategory" action="./" method="post" class="x_clearfix">
	<input type="hidden" name="module" value="module" />
	<input type="hidden" name="act" value="procModuleAdminInsertCategory" />
	<input type="hidden" name="page" value="{$page}" />
	<input type="hidden" name="module_srl" value="{$module_srl}" />
	<input type="hidden" name="module_category_srl" value="" />
	<input type="hidden" name="xe_validator_id" value="modules/module/tpl/category_list/2" />
	<div class="x_pull-right x_input-append">
		<input type="text" name="title" title="{$lang->category_title}" placeholder="{$lang->category_title}" required />
		<input type="submit" class="x_btn x_btn-primary" value="{$lang->cmd_registration}">
	</div>
</form>
